package ar.fiuba.tp7552.buildadmin.model;

/**
 * Simple JavaBean domain object with an id property.
 * Used as a base class for objects needing this property.
 *
 * @author German Ulrich
 */
public abstract class BaseEntity {

	/** Id of the entity. */
	protected Long id;
	
    /** 
     * Accessor for the id of the entity.
     * @return Id of the entity.
     */
	public Long getId() {
		return id;
	}

    /**
     * Mutator for the id of the entity.
     * @param id Id of the entity.
     */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * 
	 * @return
	 */
	public boolean isNew() {
		return (this.id == null);
	}
	
    /**
     * Default Constructor.
     **/
	protected BaseEntity() {
		super();
	}

}